Personal computer systems are well known in the art. Personal computer systems in general, and IBM Personal Computers in particular, have attained widespread use for providing computer power to many segments of today's modern society. Personal computers can typically be defined as a desktop, floor standing, or portable microcomputer that is comprised of a system unit having a single central processing unit (CPU) and associated volatile and non-volatile memory, including all RAM and BIOS ROM, a system monitor, a keyboard, one or more flexible diskette drives, a fixed disk storage drive (also known as a "hard drive"), a so-called "mouse" pointing device, and an optional printer. One of the distinguishing characteristics of these systems is the use of a motherboard or system planar to electrically connect these components together. These systems are designed primarily to give independent computing power to a single user and are inexpensively priced for purchase by individuals or small businesses. Examples of such personal computer systems are IBM's PERSONAL COMPUTER AT and IBM's PERSONAL SYSTEM/1 (IBM PS/1).
Personal computer systems are typically used to run software to perform such diverse activities as word processing, manipulation of data via spread-sheets, collection and relation of data in databases, displays of graphics, design of electrical or mechanical systems using system-design software, etc.
The first four related applications disclose a computer system having four power management states: a normal operating state, a standby state, a suspend state, and an off state. One switch is used to change between the off state, the normal operating state, and the suspend state.
The normal operating state of the computer system of the present invention is virtually identical to the normal operating state of any typical desktop computer. Users may use applications and basically treat the computer as any other. One difference is the presence of a power management driver, which runs in the background (in the BIOS and the operating system), transparent to the user. The portion of the power management driver in the operating system (OS) is the Advanced Power Management (APM) advanced programming interface written by Intel and Microsoft, which is now present in most operating systems written to operate on Intel's 80X86 family of processors. The portion of the power management driver in BIOS (APM BIOS) communicates with the APM OS driver. The APM OS driver and the APM BIOS routines together control the computer's transition to and from the other three states.
The second state, the standby state, uses less power than the normal operating state, yet leaves any applications executing as they would otherwise execute. In general, power is conserved in the standby state by placing devices in their respective low-power modes. For example, power is conserved in the standby state by ceasing the revolutions of the fixed disk within the hard drive and by ceasing generating the video signal.
The third state is the suspend state. In the suspend state, computer system consumes an extremely small amount of power. The suspended computer consumes very little power from the wall outlet. The only power consumed is small amount of power to maintain the circuitry that monitors the switch from a battery inside the computer system (when the system is not receiving AC power) or a small amount of power generated at an auxiliary power line by the power supply (when the system is receiving AC power).
This small use of power is accomplished by saving the state of the computer system to the fixed disk storage device (the hard drive) before the power supply is turned "off." To enter the suspend state, the computer system interrupts any executing code and transfers control of the computer to the power management driver. The power management driver ascertains the state of the computer system and writes the state of the computer system to the fixed disk storage device. The state of the CPU registers, the CPU cache, the system memory, the system cache, the video registers, the video memory, and the other devices' registers are all written to the fixed disk. The entire state of the system is saved in such a way that it can be restored without the code applications being adversely affected by the interruption. The computer then writes data to the non-volatile CMOS memory indicating that the system was suspended. Lastly, the computer causes the power supply to stop producing power. The entire state of the computer is safely saved to the fixed disk storage device, system power is now "off," and computer is now only receiving a small amount of regulated power from the power supply to power the circuitry that monitors the switch.
The fourth and final state is the off state. In this state, the power supply ceases providing regulated power to the computer system, but the state of the computer system has not been saved to the fixed disk. The off state is virtually identical to typical desktop computers being turned off in the usual manner.
Switching from state to state is handled by the power management driver and is typically based on closure events of a single switch, a flag, and two timers: the inactivity standby timer and the inactivity suspend timer. The system has a single power button. This button can be used to turn on the computer system, suspend the state of the system, restore the state of the system, and turn off the system.
It is desirable to be able to turn on the computer system at a certain time. The resume alarm feature is useful in automating numerous tasks such as system maintenance (performing hard disk drive backups, defragmenting hard disk drives), collecting system information (downloading stock quotes, news, weather, bank statements, etc.), and sending outgoing mail when telephone rates are lowest.
This "wake on alarm" feature is conceptually very simple: turn the system on at a particular data and time. Several prior art notebook computers and lap top computers have had this feature for quite a while. They typically use an expensive, specialized version of the real time clock (RTC) that has been integrated into just about every IBM and so-called compatible computer since the IBM AT computer. The RTC has a 24 hour alarm that can be programmed to generate an interrupt (IRQ8) when the alarm hours, minutes, and seconds match the current hours and minutes. Portables typically leave most devices powered when in suspend, therefore, some of the portion of the interface to the RTC is alive and can initiate a resume when the alarm expires.
There are at least two problems with using the RTC to implement the wake on alarm feature. First, the RTC alarm only spans a 24 hour period. If an event is intended to be scheduled further away in time than 24 hours, the system must wake up at least once every 24 hours and some higher level scheduler must decide whether this is the correct day. Second, if a portable supports suspending, typically the alarm cannot resume the system from that state because it is not powered. Even though the RTC is likely to be powered by a separate battery, the interface logic that drives the wake interrupt (IRQ8) probably requires system power. Therefore, it is not accessible to initiate the resume and restore the state of the computer.
Waking the system from a phone ring is another task that is common among portables. Typically, if a portable computer is configured to resume on a ring from an internal modem, the modem is an expensive modem having a low power mode. The modem is placed into the lowest power mode where there is still enough intelligence to detect a ring and awaken the system. Again this requires power that is available during a suspend but is typically not available when the system is suspended.